<script setup>
import { ref, onMounted } from 'vue'
const accessToken = ref('')
const username = ref('')


onMounted(() => {
  let data = JSON.parse(window.localStorage.getItem('access-token'));
  accessToken.value = data.token;
  username.value = data.username;
  console.log('token===>',accessToken.value);
})

</script>

<template>
  <h2>Home</h2>
  <span>{{username}}</span>
  <br>
  <span>{{accessToken}}</span>
  <br>
  <br>
  <router-link to="/about">About</router-link>

</template>

<style scoped>

</style>